package cn.com.smartdevices.bracelet.chart.compat;

import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.os.Build.VERSION;
import android.view.View;

/* renamed from: cn.com.smartdevices.bracelet.chart.a.a */
public class Compat {
    public static void postOnAnimationInvalidate(View view) {
        if (VERSION.SDK_INT >= 16) {
            C0744f.postInvalidateOnAnimation(view);
        } else if (VERSION.SDK_INT >= 11) {
            C0742d.postInvalidateOnAnimation(view);
        } else {
            C0740b.postInvalidateOnAnimation(view);
        }
    }

    static final class C0741c implements Runnable {
        final /* synthetic */ View f3931a;

        C0741c(View view) {
            this.f3931a = view;
        }

        public void run() {
            this.f3931a.invalidate();
        }
    }

    static class C0740b {
        C0740b() {
        }

        static void postInvalidateOnAnimation(View view) {
            view.postDelayed(new C0741c(view), 10);
        }

        static void setAlpha(View view, float f) { // m8566a
        }

        static void postOnAnimation(View view, Runnable runnable) { // m8567a
            view.postDelayed(runnable, 10);
        }
    }

    static final class C0743e implements Runnable {
        final /* synthetic */ View f3932a;

        C0743e(View view) {
            this.f3932a = view;
        }

        public void run() {
            this.f3932a.invalidate();
        }
    }

    static class C0742d {
        C0742d() {
        }

        static void postInvalidateOnAnimation(View view) { // m8568a
            view.postDelayed(new C0743e(view), ValueAnimator.getFrameDelay());
        }

        static void setAlpha(View view, float f) { // m8569a
            view.setAlpha(f);
        }

        static void postOnAnimation(View view, Runnable runnable) { // m8570a
            view.postDelayed(runnable, ValueAnimator.getFrameDelay());
        }
    }

    static class C0744f {
        C0744f() {
        }

        static void postInvalidateOnAnimation(View view) {//m8571a
            view.postInvalidateOnAnimation();
        }

        @SuppressLint({"NewApi"})
        static void postOnAnimation(View view, Runnable runnable) { //m8572a
            view.postOnAnimation(runnable);
        }
    }

    public static void setAlpha(View view, float f) {
        if (VERSION.SDK_INT >= 11) {
            C0742d.setAlpha(view, f);
        } else {
            C0740b.setAlpha(view, f);
        }
    }

    public static void postOnAnimation(View view, Runnable runnable) {
        if (VERSION.SDK_INT >= 16) {
            C0744f.postOnAnimation(view, runnable);
        } else if (VERSION.SDK_INT >= 11) {
            C0742d.postOnAnimation(view, runnable);
        } else {
            C0740b.postOnAnimation(view, runnable);
        }
    }
}
